// PrPageEdit.cpp : implementation file
//

#include "stdafx.h"
#include "ansieditor.h"
#include "PrPageEdit.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CPrPageEdit dialog


CPrPageEdit::CPrPageEdit(CWnd* pParent /*=NULL*/)
	: CPrPage(CPrPageEdit::IDD, pParent)
{
	//{{AFX_DATA_INIT(CPrPageEdit)
	m_bSelectAfterPaste = FALSE;
	m_b2Color1Char = FALSE;
	//}}AFX_DATA_INIT
}


void CPrPageEdit::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CPrPageEdit)
	DDX_Check(pDX, IDC_CHK_SELECT_AFTER_PASTE, m_bSelectAfterPaste);
	DDX_Check(pDX, IDC_CHK_2COLOR_1CHAR, m_b2Color1Char);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CPrPageEdit, CDialog)
	//{{AFX_MSG_MAP(CPrPageEdit)
		// NOTE: the ClassWizard will add message map macros here
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CPrPageEdit message handlers

BOOL CPrPageEdit::OnInitDialog() 
{
	m_bSelectAfterPaste = gpApp->m_options.bSelectAfterPaste;
	m_b2Color1Char = gpApp->m_options.b2Color1Char;

	CPrPage::OnInitDialog();
	
	return TRUE;
}

BOOL CPrPageEdit::ValidateData()
{
	UpdateData();
	gpApp->m_options.bSelectAfterPaste = m_bSelectAfterPaste;
	gpApp->m_options.b2Color1Char = m_b2Color1Char;
	
	return TRUE;
}